package com.cetcs.kmga.dataManager.entity.dataManager;

/**
 * 数据资源审计对象信息
 * Created by yyangs on 2017/8/23.
 */
public class ResrcAuditObj {
    //id
    private Integer id;
    //资源id
    private Integer resrcId;
    //审计对象类型
    private String type;
    //服务器ip
    private String serverIp;
    //端口号
    private Integer port;
    //来源
    private Integer src;
    //审计对象名称
    private String name;
    //别名
    private String alias;
    //备注
    private String remark;
    //获取时间
    private String getTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getResrcId() {
        return resrcId;
    }

    public void setResrcId(Integer resrcId) {
        this.resrcId = resrcId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getServerIp() {
        return serverIp;
    }

    public void setServerIp(String serverIp) {
        this.serverIp = serverIp;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Integer getSrc() {
        return src;
    }

    public void setSrc(Integer src) {
        this.src = src;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getGetTime() {
        return getTime;
    }

    public void setGetTime(String getTime) {
        this.getTime = getTime;
    }


    /**
     * 判断两个资源是否相同
     * @param o
     * @return
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ResrcAuditObj that = (ResrcAuditObj) o;

        if (!serverIp.equals(that.serverIp)) return false;
        if (!port.equals(that.port)) return false;
        return src.equals(that.src);
    }

    @Override
    public int hashCode() {
        int result = serverIp.hashCode();
        result = 31 * result + port.hashCode();
        result = 31 * result + src.hashCode();
        return result;
    }
}



